import request from '@/utils/request'

// 查询监控电表列表
export function listAmmeter(query) {
  return request({
    url: '/mes/bm/ammeter/list',
    method: 'get',
    params: query
  })
}

// 查询监控电表详细
export function getAmmeter(id) {
  return request({
    url: '/mes/bm/ammeter/' + id,
    method: 'get'
  })
}

// 新增监控电表
export function addAmmeter(data) {
  return request({
    url: '/mes/bm/ammeter/add',
    method: 'post',
    data: data
  })
}

// 修改监控电表
export function updateAmmeter(data) {
  return request({
    url: '/mes/bm/ammeter',
    method: 'put',
    data: data
  })
}

// 删除监控电表
export function delAmmeter(id) {
  return request({
    url: '/mes/bm/ammeter/' + id,
    method: 'delete'
  })
}

// 获取区域电表树
export function getAmmeterTree(query) {
  return request({
    url: '/mes/bm/ammeter/tree',
    method: 'get',
    params: query
  })
}
